<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>学生管理</title>

<script type="text/javascript">
	function bbb(from){
		var name=from.name.value;
		var stuNo=from.stuNo.value;
		var password=from.password.value;
		var reg= /^[1-9]\d*$/;
		if(name.length==0){
			alert("学生名字必填");
			return false;
		}
		if(stuNo.length==0){
			alert("学号必填");
			return false;
		}
		if(password.length==0){
			alert("密码必填");
			return false;
		}
		return true;
	}
	function student(){
		window.location="xuesheng?bjId=${model.tbclass.id}"		
	}
</script>

</head>
<body>
<div class="aaa">
<form action="xuesheng?method=save" method="post" onsubmit="return bbb(this)">
	<input type="hidden" name="id" value="${model.id}">
	<input type="hidden" name="bjId" value="${model.tbclass.id}">
	<p><label>学号：</label><input type="text" name="stuNo" value="${model.stuNo}"></p>
	<p><label>姓名：</label><input type="text" name="name" value="${model.name}"></p>
	<p><label>密码：</label><input type="password" name="password" value="${model.password}"></p>	
	<p>
	<button type="submit" data-text="提交">提交</button>
    <button type="reset"  data-text="重置">重置</button>
	<button onclick="student()" >返回</button>
</form>
</div>
</body>
</html>